<?php
/**
 * User zgh
 * Email 1803897171@qq.com
 * Date 2021/7/13
 **/

namespace app\common\middleware;


use app\admin\service\LoginService;
use app\common\Annotation\ControllerAnnotation;
use app\common\Annotation\NodeAnotation;
use app\common\service\AuthService;
use app\common\service\ConfigService;
use Doctrine\Common\Annotations\AnnotationReader;
use think\facade\Config;
use think\facade\Request;

class ConfigMergeWare
{

    public function handle($request, \Closure $next)
    {
        $config = ConfigService::getDbConfig();
        if ($config) {
            Config::set($config, "app");
        }
        return $next($request);
    }

}